package com.nyist.myticket.core.enums;

/**
 * @author yangxiaogen
 * @date 2021/1/4 16:35
 */
public enum DataStatusEnum {

    NORMAL("0", "正常使用"),
    DISABLE("1", "停用"),
    REMOVE("2", "删除");

    private String code;
    private String msg;

    DataStatusEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getValueByCode(String code){
        for (DataStatusEnum dataStatusEnum : DataStatusEnum.values()) {
            if (dataStatusEnum.getCode().equals(code)) {
                return dataStatusEnum.getMsg();
            }
        }
        return null;
    }


}
